<template>
	<div>
		<el-dialog title="查看详情" width="800px" @open="open" class="icon-dialog" :visible.sync="show" :before-close="closeForm" append-to-body>
			<table class="table table-bordered" align="center" width="100%" style="word-break:break-all; margin-bottom:50px;  font-size:13px;">
				<tbody>
				 <tr>
						<td class="title" width="100">{{$t('field.Job_job_id')}}：</td>
						<td>
							{{form.job_id}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Job_job_name')}}：</td>
						<td>
							{{form.job_name}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Job_job_group')}}：</td>
						<td>
							{{form.job_group}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Job_module')}}：</td>
						<td>
							{{form.module}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Job_invoke_target')}}：</td>
						<td>
							{{form.invoke_target}}
						</td>
				 </tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Job_cron_expression')}}：</td>
						<td>
							{{form.cron_expression}}
						</td>
				 </tr>
				<tr>
						<td class="title" width="100">{{$t('field.Job_misfire_policy')}}：</td>
						<td>
							<span v-if="form.misfire_policy == '1'">立即执行</span>
							<span v-if="form.misfire_policy == '2'">执行一次</span>
							<span v-if="form.misfire_policy == '3'">放弃执行</span>
						</td>
				</tr>
				<tr>
						<td class="title" width="100">{{$t('field.Job_concurrent')}}：</td>
						<td>
							<span v-if="form.concurrent == '1'">允许</span>
							<span v-if="form.concurrent == '0'">禁止</span>
						</td>
				</tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Job_status')}}：</td>
						<td>
							<span v-if="form.status == '1'">正常</span>
							<span v-if="form.status == '0'">暂停</span>
						</td>
				</tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Job_create_by')}}：</td>
						<td>
							{{form.create_by}}
						</td>
				 </tr>
				<tr>
						<td class="title" width="100">{{$t('field.Job_create_time')}}：</td>
						<td>
							{{parseTime(form.create_time)}}
						</td>
				</tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Job_update_by')}}：</td>
						<td>
							{{form.update_by}}
						</td>
				 </tr>
				<tr>
						<td class="title" width="100">{{$t('field.Job_update_time')}}：</td>
						<td>
							{{parseTime(form.update_time)}}
						</td>
				</tr>
				 <tr>
						<td class="title" width="100">{{$t('field.Job_remark')}}：</td>
						<td>
							{{form.remark}}
						</td>
				 </tr>
				</tbody>
			</table>
		</el-dialog>
	</div>
</template>
<script>
import { detail } from '@/api/admin/job'
export default {
	name:'jobdetail',
	props: {
		show: {
			type: Boolean,
			default: true
		},
		size: {
			type: String,
			default: 'mini'
		},
		info: {
			type: Object,
		},
	},
	data() {
		return {
			form:{
			},
		}
	},
	methods: {
		open(){
			detail(this.info).then(res => {
				this.form = res.data
			})
		},
		closeForm(){
			this.$emit('update:show', false)
		}
	}
}
</script>
<style  lang="scss">
@import '@/assets/scss/common.scss'
</style>
